import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
//引入路由组件
import Home from '@/pages/Home/Home'
import MV from '@/pages/MV/MV'
import NewAlbum from '@/pages/NewAlbum/NewAlbum'
import NumberEdition from '@/pages/NumberEdition/NumberEdition'
import RadioStation from '@/pages/RadioStation/RadioStation'
import Ranking from '@/pages/Ranking/Ranking'
import Singer from '@/pages/Singer/Singer'
import SongType from '@/pages/SongType/SongType'
import SongDetail from '@/pages/SongDetail/SongDetail'
import MenuDetail from '@/pages/MenuDetail/MenuDetail'
import AlbumDetail from '@/pages/AlbumDetail/AlbumDetail'
import SingerDetail from '@/pages/SingerDetail/SingerDetail'
import AllSingerSong from '@/pages/AllSingerSong/AllSingerSong'
import AllSingerAlbum from '@/pages/AllSingerAlbum/AllSingerAlbum'
import AllSingerMv from '@/pages/AllSingerMv/AllSingerMv'
import MvDetail from '@/pages/MvDetail/MvDetail'

export default new Router({
  mode:'history',
  routes: [
    {
      path:'/',
      redirect:'/home'
    },
    {
      path: '/home',
      component:Home
    },
    {
      path: '/mv',
      component:MV
    },
    {
      path: '/newalbum',
      component:NewAlbum
    },
    {
      path: '/numberedition',
      component:NumberEdition
    },
    {
      path: '/radiostation',
      component:RadioStation
    },
    {
      path: '/ranking/:id',
      component:Ranking
    },
    {
      path:'ranking',
      redirect: 'ranking/4'
    },
    {
      path: '/singer',
      component:Singer
    },
    {
      path: '/songtype',
      component:SongType
    },
    {
      path:'/songdetail',
      component:SongDetail
    },
    {
      path:'/menudetail/:id',
      component:MenuDetail
    },
    {
      path:'/albumdetail/:mid/:id',
      component:AlbumDetail
    },
    {
      path:'/singerdetail/:mid',
      component:SingerDetail,
      children:[
        {path:'/singerdetail/:mid/song/:songtotal',component:AllSingerSong},
        {path:'/singerdetail/:mid/album/:albumtotal',component:AllSingerAlbum},
        {path:'/singerdetail/:mid/mv/:mvtotal',component:AllSingerMv}
      ]
    },
    {
      path:'/mvdetail/:mid',
      component:MvDetail
    }
  ]
})
